<?php
class daohangView extends GetLoad
{




    public function panduanxiugai($name){ //判断是否是已登录人的自己的主页

        if(isset($_COOKIE['name']) and $_COOKIE['name']==$name ){
          
            return 1;
        }else{
            
            return 0;
        }
    }


    function jianliview($data)
    {  
       $this->load("Model/guanzhu");
       $guanzhu= new ModelGuanzhu();
       $title=$guanzhu->panduan($data['name_id'],$data['name_id2']);
       $url=$guanzhu->panduan2($data['name_id'],$data['name_id2']);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>我的博客</title>
	<link rel="stylesheet" href="./css/bootstrap.min.css">  
	<script src="./js/jquery.min.js"></script>
	<script src="./js/bootstrap.min.js"></script>
    <script type="text/javascript" src="./js/ckeditor.js"></script>
    <meta name="keywords" content="" />
    
    <meta name="description" content="" />
    <meta name="generator" content="" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href="css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print" />
    <link href="css/print.css" rel="stylesheet" type="text/css"  media="print" />
    <script src="js/jquery-1.10.1.min.js"></script>
    <script src="js/side.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/Calendar3.js"></script>

</head>

<body>

 	 <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> 
        <div style="background-color:#CCC" >
            <div class="container container-fluid" >
                <ul class="nav nav-pills nav-fixed-top ">
                    <li ><a href="./index.php?route=Controller/shouye/ControllerShouye/index">首页</a></li>
                    <li ><a href="./index.php?route=Controller/boke/ControllerBook/index">文章</a></li>
                    <li><a <?php echo "href='./index.php?route=Controller/guanzhu/ControllerGuanzhu/getguanzhu&=".$data['name_id']."'" ?> >关注</a></li>
                    <li><a href="./index.php?route=Controller/boke/ControllerBook/index">我的博客</a></li>
                    <li><a href="./index.php?route=Controller/xuesheng/ControllerXuesheng/index">进入教学</a></li>
                    <li><a href="./admin">进入教师后台</a></li>
                    <?php if($data['user']=='1') { ?>
                    <li class="navbar-right dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">消息<span class="badge"><?php echo $data['xiaoxi']?></span><b class="caret"></b></a>


                       <ul class="dropdown-menu" >
                            <li><a <?php echo "href='./index.php?route=Controller/sixin/ControllerSixin/getsixin&=".$data['name_id']."'" ?> >私信<span class="badge"><?php echo $data['sixin']?></span></a></li>
                            <li><a <?php echo "href='./index.php?route=Controller/dianzan/ControllerDianzan/getdianzan&=".$data['name_id']."'" ?> >点赞<span class="badge"><?php echo $data['dianzan']?></span></a></li>
                            <li><a <?php echo "href='./index.php?route=Controller/guanzhu/ControllerGuanzhu/getguanzhu&=".$data['name_id']."'" ?> >关注<span class="badge"><?php echo $data['noticer']?></span></a></li>
                            <li class="divider"></li>
                            <li><a <?php echo "href='index.php?route=Controller/lajixiang/ControllerLajixing/getlajixiang&=".$data['name_id']."'" ?>  >垃圾箱<span class="badge"><?php echo $data['lajixiang']?></span></a></li>
                            <li><a href="./index.php?route=Controller/shanchu/ControllerShanchu/shanchu" >退出</a></li>
						</ul>
                    
                    </li>
                    <?php }else{ ?>

                    <li class="navbar-right dropdown"><a href="./index.php?route=Controller/denglu/ControllerDenglu/denglu" >登录</a></li>

                    <?php } ?>
                    <?php if($data['name2']){?>
                    <li class="navbar-right "><a href="#collapseOne" data-toggle="collapse" data-parent="#accordion" >作者详情</a></li>
                </ul>  
                
            </div>
        </div>
    </nav>
                    <?php } else{?>
                     <?php if($this->panduanxiugai($data['name'])) { ?>

                            <li class="navbar-right">
                              <a <?php echo "href='./index.php?route=Controller/informationxiugai/ControllerInformationxiugai/information'";?> ><span class="glyphicon glyphicon-plus"></span> </a>
                            </li>

                         <?php } ?>

                    <li class="navbar-right "><a href="#collapseOne" data-toggle="collapse" data-parent="#accordion" ></a></li>
                </ul>  
                
            </div>
        </div>
    </nav>





                    <?php }?>
    
		<div id="collapseOne" class="panel-collapse collapse " style="z-index:9;position:absolute;left:30%;top:0px;width:50%;">
			<div style="width:100%;background-color:#CCC;position:absolute;top:40px;">
				<div style="top:30px;">
					<img src="./img/1.jpg" style="margin-top:50px;height:150px;width:150px"class="img-circle center-block"></img>
				</div>
				<div class="center-block" style="width:250px;margin-top:20px;">
					<div class="col-sm-6"  ><button type="button" class="btn btn-primary btn-lg" style="background-color:#ccc"><span class="glyphicon glyphicon-user"><?php echo $data['name2']; ?></span></button></div>
					<div class="col-sm-6" ><button type="button" class="btn btn-primary btn-lg" style="background-color:#ccc"><a <?php echo "href='".$url."'" ?>  ><span class="glyphicon glyphicon-user"><?php echo $title; ?></span></a></button></div>
				</div>
				
				
			</div>
		</div>	
		
        
    <div class="container" style="width:100%; margin-top:50px; background-color:#f8f8f8;">
    
    
        
        
<?php 

    }
}



 ?>